const http = require('http');
const server = http.createServer((request,response)=>{
    response.setHeader('Content-type','text/html');
    response.setHeader('X-Foo','bar');
    response.writeHead(200,{'Content-type':'text/plan'});
    response.end(
    `<html htmlatr=html>
        <head> 
            <style>
                body div #myid{
                    width: 100px;
                    backgroun-color: fff;
                }
                body div img{
                    width: 30px;
                    background-color: #ff1111;
                }
            </style>
        </head>
        <body>
            <div>
                <img id="myid"/>
                <img />
            </div>
        </body>
    </html>`);
});
server.listen(8888,()=>{
    console.log('启动服务监听-8888')
})